<template>
  <div class="container">
    <van-nav-bar title="详细信息" left-arrow @click-left="onClickLeft" />
    <div class="content">
      <div class="inner">
        <div style="color:#787D85;font-size:14px">登录账号名</div>
        <div style="color:#020C1D;font-size:14px">{{linkInfo.name}}</div>
      </div>
      <div class="inner">
        <div style="color:#787D85;font-size:14px">联系电话</div>
        <div style="color:#020C1D;font-size:14px">{{linkInfo.mobile}}</div>
      </div>
      <div class="inner">
        <div style="color:#787D85;font-size:14px">实名信息</div>
        <div style="color:#020C1D;font-size:14px">
          {{linkInfo.user_infos
          .ali_name}}
        </div>
      </div>
      <div class="inner">
        <div style="color:#787D85;font-size:14px">实名信息</div>
        <div style="color:#020C1D;font-size:14px">
          {{linkInfo.user_infos
          .bank_name}}
        </div>
      </div>
      <div class="inner">
        <div style="color:#787D85;font-size:14px">身份证号</div>
        <div style="color:#020C1D;font-size:14px">{{linkInfo.user_infos.ali_idcard }}</div>
      </div>
      <div class="inner">
        <div style="color:#787D85;font-size:14px">身份证号</div>
        <div style="color:#020C1D;font-size:14px">{{linkInfo.user_infos.bank_idcard }}</div>
      </div>
      <div class="inner">
        <div style="color:#787D85;font-size:14px">分销链路</div>
        <div style="color:#020C1D;font-size:14px;" v-for="(item, index) in detailData" :key="index" >
          <span v-if="index">></span>
          <span>{{ item.name }}</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      linkInfo: {},
      detailData: []
    };
  },
  created() {
    this.getLinkInfo();
  },
  mounted() {},
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    getLinkInfo() {
      axios
        .get("/own/agent/link?id=" + this.$route.query.shop_id)
        .then(response => {
          if (response.data.msg.code == 0) {
            this.linkInfo = response.data.data;
            this.detailData = this.linkInfo.relation_tree;
          } else {
            this.$message.error(response.data.msg.info);
          }
        });
    }
  }
};
</script>
<style lang="less" scoped>
.container {
  height: 100%;
  background: white;
  .content {
    width: 100%;
    padding: 0 15px;
    .inner {
      height: 45px;
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
}

/deep/ .van-nav-bar .van-icon {
  color: black;
}
/deep/ .van-nav-bar__content {
  background-color: #f6f6f6;
}
</style>